﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Runtime.Serialization;

namespace HttpCrawler.Engine.Test.Internal
{
    internal class StringHttpCrawlerContent : HttpCrawlerContent
    {
        public StringHttpCrawlerContent(Uri requestUrl, Uri referrerUrl, HttpWebResponse webResponse)
            : base(requestUrl, referrerUrl, webResponse)
        {
            
        }

        public string OverrideText
        {
            get;
            set;
        }
        
        public override string Text
        {
            get
            {
                return OverrideText;
            }
        }

        public static StringHttpCrawlerContent CreateUninitialized()
        {
            return (StringHttpCrawlerContent)FormatterServices.GetUninitializedObject(typeof(StringHttpCrawlerContent));
        }
    }
}
